package Leave

import (
	"github.com/gin-gonic/gin"
	"project/pkg/dao/mysql"
	"project/pkg/router"
)

func init() {
	router.AddRouter(new(LRouter))
}

type LRouter struct {
}
type LHandler struct {
	M mysql.Mysql
}

func NewLHandler() *LHandler {
	return &LHandler{
		M: mysql.NewMysql(),
	}
}
func (LRouter) Router(e *gin.Engine) {
	handler := NewLHandler()
	leave := e.Group("leave")
	leave.POST("/student/create", handler.CreateWx)
	leave.POST("/student/search", handler.SearchAllToStudent)
	leave.POST("/student/delete", handler.DeleteLeave)
	leave.POST("/teacher/op", handler.ToConfirmStudent)
	leave.POST("/op/op", handler.ToReturnConfirmStudent)
}
